diff options
| author | Joe Carstairs <me@joeac.net> | 2024-12-24 09:26:32 +0000 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2024-12-24 09:26:32 +0000 |
| commit | 532f75bea033e8073c4c1bc1dff72fa6af7d5316 (patch) | |
| tree | b39d4419a9b23fc210399c6277628b1a2d4f5dee /website/src/pages/blog/[...slug].astro | |
| parent | b080e5631416451e548ff4de943e1b6a196225ee (diff) | |
Upgrades to Astro 5
Diffstat (limited to 'website/src/pages/blog/[...slug].astro')
| -rw-r--r-- | website/src/pages/blog/[...slug].astro | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/website/src/pages/blog/[...slug].astro b/website/src/pages/blog/[...slug].astro index 800c534..0754ea7 100644 --- a/website/src/pages/blog/[...slug].astro +++ b/website/src/pages/blog/[...slug].astro @@ -1,20 +1,20 @@ --- -import { type CollectionEntry, getCollection } from 'astro:content'; +import { type CollectionEntry, getCollection, render } from 'astro:content'; import BlogPost from '../../layouts/BlogPost.astro'; export async function getStaticPaths() { const posts = await getCollection('blog'); return posts.map((post) => ({ - params: { slug: post.slug }, + params: { slug: post.id }, props: post, })); } type Props = CollectionEntry<'blog'>; const post = Astro.props; -const { Content } = await post.render(); +const { Content } = await render(post); --- <BlogPost {...post.data}> <Content /> -</BlogPost>
\ No newline at end of file +</BlogPost> |
